package com.jintian.smart.base.support.mapper;

import com.jintian.smart.base.api.support.form.TableQueryForm;
import com.jintian.smart.base.api.support.view.TableColumnVO;
import com.jintian.smart.base.api.support.view.TableVO;
import com.jintian.smart.kernel.orm.mapper.IBaseExtMapper;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.annotation.Mapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;

import java.util.List;

@Mapper
@SqlResource("CodeGenerator")
public interface CodeGeneratorMapper extends IBaseExtMapper<TableVO> {
    /**
     * 分页查询表
     */
    PageResult<TableVO> queryTableList(@Param("queryForm") TableQueryForm queryForm);

    /**
     * 查询表是否存在
     *
     * @param tableName
     * @return
     */
    long countByTableName(@Param("tableName") String tableName);


    /**
     * 查询表列信息
     *
     * @param tableName
     * @return
     */
    List<TableColumnVO> selectTableColumn(@Param("tableName") String tableName);
}